<%-- 
    Document   : register
    Created on : Nov 10, 2010, 2:06:34 PM
    Author     : edwinelpaisa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@page import="java.sql.ResultSet"%>
<!doctype html>
<%
                HttpSession sessionUser=request.getSession();
                String value = "";
                ResultSet res = null;
                int tUser = -1;
                if(sessionUser.getAttribute("result") != null){
                    res=(ResultSet)sessionUser.getAttribute("result");
                    tUser = res.getInt(6);
                }
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>::Register::</title>
        <link href="../styles/register.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="../js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.css"/>
        <link href="../js/jquery/alerts/jquery.alerts.css" rel="stylesheet" type="text/css" />        

        <script src="../js/jquery/jquery-1.4.2.js" type="text/javascript"></script>        
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
        <script type="text/javascript" src="../js/jquery/fancybox/fancybox/jquery.fancybox-1.3.1.js"></script>
        <script type="text/javascript" src="../js/jquery/alerts/jquery.alerts.js"></script>
        
        <script type="text/javascript" language="javascript" src="../js/md5.js"></script>
        <script type="text/javascript" language="javascript" src="../js/validations.js"></script>
        <script type="text/javascript" language="javascript" src="../js/ajax.js"></script>
        <script type="text/javascript" language="javascript" src="../js/register.js"></script>
    </head>
    <body>
        <center>
                <table class="text" onkeypress="if(event.keyCode==13){btnRegister_onclick();}">
                    <tr>
                        <td>Identificaci&oacute;n:</td> <td><input type="number" id="txtId" min="0" max="1057999999" placeholder="123456" /></td>
                    </tr>
                    <tr>
                        <td>Correo-e:</td> <td><input type="email" id="txtMail" placeholder="ejemplo@travelmap.com" onkeypress="return validarEmail(event)"/></td>
                    </tr>
                    <tr>
                        <td>Nombre:</td> <td><input type="text" id="txtName" placeholder="Nombre" onkeypress="return validaNombYApe(event)"/></td>
                    </tr>
                    <tr>
                        <td>Nombre de Usuario:</td> <td><input type="text" id="txtUName" placeholder="Nombre de Usuario" onkeypress="return letrasYNumeros(event)"/></td>
                    </tr>
                    <tr>
                        <td>Telefono:</td> <td><input type="number" id="txtTelephone" min="1000000" max="3229999999" placeholder="123456"/></td>
                    </tr>
                    <tr>
                        <td>Password:</td> <td><input type="password" placeholder="******" id="txtPassword1" /></td>
                    </tr>
                    <tr>
                        <td>Repetir Password:</td> <td><input type="password" placeholder="******" id="txtPassword2" /></td>
                    </tr>
                    <%if(tUser == 2){%>
                    <tr>
                        <td>Tipo de Usuario:</td> <td><select id="userType">
                                <option value="0">Cliente</option>
                                <option value="1">Empleado</option>
                                <option value="2">Administrador</option>
                                </select></td>
                    </tr>
                    <%}%>
                    <tr>
                        <td align="center" colspan="2"><input type="button" id="btnSend" value="Enviar" onclick="btnRegister_onclick();"/></td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2"><input type="button" id="btnCancel" value="Cancelar" onclick="parent.$.fancybox.close();"/></td>
                    </tr>
                </table>
        </center>
    </body>
</html>
